Menu Commands > The menu command API > getDynamicContent() |
![]() ![]() ![]() |
Description
Retrieves the content for the dynamic portion of the menu.
Arguments
menuID
The argument is the value of the id
attribute in the menuitem
tag associated with the item.
Returns
An array of strings. Each string contains the name of a menu item and its unique ID, separated by a semicolon. If the function returns null
, then no change is made to the menu.
Example
The following instance of getDynamicContent()
returns an array of four menu items (My Menu Item 1, My Menu Item 2, and so on):
function getDynamicContent(){ var stringArray= new Array(); var i=0; var numItems = 4; for (i=0; i<numItems;i++) stringArray[i] = new String("My Menu Item " + i + ";id=" + i); return stringArray; }
![]() ![]() ![]() |